<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	<base href="<%=basePath%>">
		<meta charset="UTF-8">
		<title>红酒</title>
		<link rel="stylesheet" href="<%=basePath%>/css/produce_search_one.css" />
		<link rel="stylesheet" href="<%=basePath%>/css/prism_nav.css" />
	</head>
	<body id="produce_search">
			<jsp:include page="header_htl.jsp"></jsp:include>
		<div class="mod_search_guide">
			<div class="classWrap">
				<div class="guide_box">
					<div class="guide_title">
						<span>相关分类</span>
					</div>
					<div class="guide_main">
						<ul class="guide_con">
							<li><span>葡萄酒</span></li>
							<li><span>洋酒</span></li>
							<li><span>白酒</span></li>
							<li><span>养生酒</span></li>
							<li><span>啤酒</span></li>
						</ul>
					</div>
				</div>
				<div class="brandWrap">
					<div class="brand_title">
						<span>品牌</span>
					</div>
					<div class="brand_main">
						<div class="brand_container">
							<div class="brand_img">
								<img src="img/produce_search_two/53858b3eN54e50650.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/53b28f4aN4937f605.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/53d21d78N0adc4821.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/53d21e18N5cf91be3.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/53d21663Nc9d47409.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/53f5a794N279c75f2.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/539d5130N75e60db2.jpg"/>
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/546b2218N4cd71817.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/5386e532N8c5ac7f8.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/5396cf15N9eed43f1.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/53858b3eN54e50650.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/53858b3eN54e50650.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/53858b3eN54e50650.jpg" />
								<div class="cover_img">安家</div>
							</div>
							<div class="brand_img">
								<img src="img/produce_search_two/53858b3eN54e50650.jpg" />
								<div class="cover_img">安家</div>
							</div>
						</div>
					</div>
				</div>
				<div class="guide_box">
					<div class="guide_title">
						<span>国产/进口</span>
					</div>
					<div class="guide_main">
						<ul class="guide_con">
							<li><span>国产</span></li>
							<li><span>进口</span></li>
							<li><span>其它</span></li>
						</ul>
					</div>
				</div>
				<div class="guide_box">
					<div class="guide_title">
						<span>产地</span>
					</div>
					<div class="guide_main">
						<ul class="guide_con">
							<li><span>法国</span></li>
							<li><span>澳大利亚</span></li>
							<li><span>美国</span></li>
							<li><span>葡萄牙</span></li>
							<li><span>西班牙</span></li>
							<li><span>阿根廷</span></li>
							<li><span>中国</span></li>
							<li><span>南非</span></li>
							<li><span>德国</span></li>
							<li><span>意大利</span></li>
							<li><span>新西兰</span></li>
							<li><span>智利</span></li>
						</ul>
					</div>
				</div>
				<div class="guide_box">
					<div class="guide_title">
						<span>分类</span>
					</div>
					<div class="guide_main">
						<ul class="guide_con">
							<li><span>白葡萄酒</span></li>
							<li><span>红葡萄酒</span></li>
							<li><span>桃红葡萄酒</span></li>
							<li><span>果酒</span></li>
							<li><span>香槟</span></li>
							<li><span>起泡酒</span></li>
							<li><span>冰酒/贵腐/甜酒</span></li>
							<li><span>其它</span></li>
						</ul>
					</div>
				</div>
				<div class="guide_box">
					<div class="guide_title">
						<span>甜度</span>
					</div>
					<div class="guide_main">
						<ul class="guide_con">
							<li><span>半干型</span></li>
							<li><span>半甜型</span></li>
							<li><span>干型</span></li>
							<li><span>极干型</span></li>
							<li><span>甜型</span></li>
							<li><span>其它</span></li>
						</ul>
					</div>
				</div>
				<div class="guide_box">
					<div class="guide_title">
						<span>更多筛选项</span>
					</div>
					<div class="guide_main">
						<ul class="guide_con">
							<li><span>特性</span></li>
							<li><span>半甜型</span></li>
							<li><span>葡萄品种</span></li>
							<li><span>类型</span></li>
							<li><span>酸度</span></li>
							<li><span>其他类型</span></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div class="clearfix">
			<div id="plist">
				<div class="mod_search_select">
					<div class="sort_b">
						<span>价格</span>
						<span>销量</span>
						<span>新品</span>
						<span>评论</span>
						<span>价格</span>
					</div>
					<div class="show_interval">
						<div class="boxTop">
							<input value="￥"/>
							<span>-</span>
							<input value="￥"/>
						</div>
					</div>
				</div>
				<div class="mod_product_list" id="mod_product_list">
				<c:forEach items="${goodsList }" var="list">
					<div class="goodListMulti" onclick="getIndex(${list.goodId })">
						<input type="hidden" value="${list.goodId }"/> 
						<div class="mod_search_pro">
						<div class="itemBox">
							<img class="promotion" src="img/home_page/search_corner.png"/>
							<img class="proImg" alt="图片不存在" src="${pageContext.request.contextPath}${list.goodsImg[0]!=null?list.goodsImg[0].imgUrl:'/img/home_page/560a3e46N3f7851f4.jpg!cc_230x230.jpg'}"/>
							<p class="proPrice">￥${list.goodPrice}</p>
							<p class="proName">${list.goodName }${list.goodInfo }</p>
							<div class="item_act">
								<div class="shopping_act">
									<div class="shopping_num">
										<input value="1"/>
										<span>
											<a class="shopping_add" onclick="modifyBuyNum(this, 1)">+</a>
											<a class="shopping_decrease" onclick="modifyBuyNum(this, -1)">-</a>
										</span>
									</div>
									<div class="buy_btn">加入购物车</div>
								</div>
							</div>
							<p class="commit_rate">
								<span>评论：10810</span>&nbsp;&nbsp;&nbsp;
								<span>好评率：99%</span>
							</p>
							<p class="storeName">1号店自营</p>
						</div>
					</div>
					</div>
				</c:forEach>
		<!-- -------------------------------------------------------------------------------------- -->
				</div>
				<div class="mod_turn_page clearfix">
					<div class="turn_page" id="turn_page_num">
					<%
						if(request.getAttribute("goodListSize")!=null){
						int goodListSize = Integer.parseInt((String)request.getAttribute("goodListSize"));
						if(goodListSize>0){
						for(int i=1; i<=goodListSize; i++) {
					%>
						<span class="turn_page_span"><%=i %></span>
					<%}}}%>
					</div>
				</div>
			</div>
			
		</div>
		<div class="prism_wrap clearfix">
			<div class="prism_nav">
				<div class="prism_top_ad">
					<img src="img/prism_nav/5a267628N811711ba.jpg" />
				</div>
				<div class="prism_nav_center">
					<div id="prismPerson">
						<span class="prism_icon_tab">
							<img src="img/prism_nav/3.1我的.png" />
						</span>
						<u class="prism_icon_text">个人中心</u>
					</div>
					<div id="prismCart">
						<div class="prism_cart_tab">
							<span >
								<img src="img/prism_nav/3.1购物车.png" />
							</span>
						<div class="prism_cart_text"><a class="inCartConfirm"></a>购物车</div>
						</div>
					</div>
					<div id="prismCoupon">
						<span class="prism_icon_tab">
							<img src="img/prism_nav/3.1优惠券.png" />
						</span>
						<u class="prism_icon_text">首页</u>
					</div>
				</div>
				<div class="prism_nav_btm">
					<div id="prismBacktop">
						<span class="prism_icon_tab">
							<img src="img/prism_nav/回到顶部.png" />
						</span>
					</div>
				</div>
			</div>
		</div>
		<div class="prism_bottom">
			<div class="prism_bttom_ad">
				<span onclick="hiddenadd()">x</span>
				<img id="addimg" src="img/home_page/560a3e46N3f7851f4.jpg!cc_230x230.jpg" />
			</div>
		</div>
		<iframe id="iframe1" name="buttom" marginwidth=0 marginheight=0 width=1460 height=350 scrolling="no" src="buttom_htl_2.html" frameborder=0></iframe>
		<iframe id="iframe2" name="buttom" marginwidth=0 marginheight=0 width=1440 height=120 scrolling="no" src="buttom_htl.html" frameborder=0></iframe>
		<script type="text/javascript" src="<%=basePath%>/js/prism_nav.js" ></script>
		<script type="text/javascript" src="<%=basePath%>/js/produce_search_one.js" ></script>
		<script type="text/javascript">
		$(".turn_page_span").click(function(){
			$.post("page.goods",{pageIndex:$(this).html()},
	                function(result){
	                var $mod_product_list = $("#mod_product_list");
	                $mod_product_list.html("");
	                for(var i=0;i<result.length;i++){
	                	$mod_product_list.append("<div class='goodListMulti' onclick='getIndex("+result[i].goodId 
	                			+")'><input type='hidden' value="+result[i].goodId +
	                			"/><div class='mod_search_pro'>"+
	    						"<div class='itemBox'>"+
	    						"<img class='promotion' src='img/home_page/search_corner.png'/>"+
	    						"<img class='proImg' alt='图片不存在'" +
	    						"src='${pageContext.request.contextPath}" + result[i].goodsImg[0].imgUrl + "'" + 
	    						"<p class='proPrice'>￥" + result[i].goodPrice + "</p>" +
	    						"<p class='proName'>" + result[i].goodName + result[i].goodInfo + "</p>" +
	    						"<div class='item_act'><div class='shopping_act'><div class='shopping_num'>" +
	    						"<input value='1'/><span><a class='shopping_add' onclick='modifyBuyNum(this, 1)'>+</a>" +
								"<a class='shopping_decrease' onclick='modifyBuyNum(this, -1)''>-</a></span></div>" +
	    						"<div class='buy_btn'>加入购物车</div></div></div><p class='commit_rate'>" +
	    						"<span>评论：10810</span>&nbsp;&nbsp;&nbsp;<span>好评率：99%</span></p>" +
	    						"<p class='storeName'>1号店自营</p></div></div></div> ");
	                }
	            },"json");
		});
		function getIndex(index){
			//var index = $(this).children().eq(0).val();
			//alert(index); 
			window.location="detail.goods?goodId="+index;
		}
		
		$('#prismPerson,#prism_icon_text').click(function(){
			if($('#activeLogin').html() != '请登录') {
				window.location = "MyOrderServlet";
			} else {
				alert("请登录");
			}
		});
		$('.prism_icon_text,.prism_icon_tab').click(function(){
			window.location = "search.goods?likeword=";
		});
		$('.inCartConfirm').click(function(){
			if($('#activeLogin').html() != '请登录') {
				window.location = "in.cart";
			} else {
				window.location = "login.jsp";
			}
		});
		</script>
	</body>
</html>
